// #define print(...)

class Solution {
public:
    bool isPalindrome(int x) {
        if(x == 0) return true;
        if(x < 0 ) return false;
        if(x%10==0)return false;
        int y = 0;
        while(x>y){
            y = 10*y + x%10;
            if(y==x || y==x/10){
                return true;
            }
            x /= 10;
        }
        return false;
    }
};
